/* 终端页面样式 */
.terminal-page {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.terminal-tabs-container {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  min-height: 40px;
  display: flex;
  align-items: center;
  padding: 0 16px;
}

.terminal-tabs {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
}

.terminal-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  color: var(--color-text);
  background: transparent;
  border: 1px solid transparent;
}

.terminal-tab:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .terminal-tab:hover {
  background: rgba(255, 255, 255, 0.05);
}

.terminal-tab.active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

.terminal-tab-title {
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-tab-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  opacity: 0.7;
}

.terminal-tab-close:hover {
  opacity: 1;
  background: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .terminal-tab-close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.terminal-add-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--color-text);
}

.terminal-add-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .terminal-add-btn:hover {
  background: rgba(255, 255, 255, 0.05);
}

.terminal-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  padding: 40px 20px;
}

.terminal-empty-icon {
  font-size: 64px;
  margin-bottom: 16px;
  opacity: 0.7;
}

.terminal-empty-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 8px;
}

.terminal-empty-description {
  color: var(--color-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

.terminal-pane-container {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.terminal-pane {
  width: 100%;
  height: 100%;
  position: absolute;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
}

.terminal-pane.active {
  opacity: 1;
  visibility: visible;
}

.xterm-container {
  width: 100%;
  height: 100%;
}

.xterm {
  padding: 8px 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .terminal-tabs {
    gap: 2px;
  }

  .terminal-tab {
    padding: 4px 8px;
    font-size: 12px;
  }

  .terminal-tab-title {
    gap: 4px;
  }

  .terminal-add-btn {
    width: 24px;
    height: 24px;
  }

  .terminal-empty {
    padding: 30px 16px;
  }

  .terminal-empty-icon {
    font-size: 48px;
  }

  .terminal-empty-title {
    font-size: 16px;
  }
}